<template>
  <div class="search-playlist">
    <music-list :personList="playlists" />
  </div>
</template>

<script>
import { _Search } from "network/search";
import MusicList from 'components/content/musiclist/MusicList.vue';
export default {
  name: 'SearchPlaylist',
  components: {
    MusicList
  },
  data () {
    return {
      searchType: 1000, // 搜索类型
      playlists: [], // 搜索结果
    };
  },
  created () {
    this.Search();
  },
  methods: {
    Search () {
      this.keywords = this.$route.params.key;
      _Search(this.keywords, this.searchType).then(res => {
        console.log(res);
        this.playlists = res.data.result.playlists;
      })
    }
  },
}
</script>

<style scoped>
</style>
